Skip to content

Fix Android 16 startup crashes related to early system access - #112

Merged
winnerspiros merged 2 commits into
masterfrom
fix/android-16-startup-crash-1721950423656955281
Mar 28, 2026
Merged

Fix Android 16 startup crashes related to early system access#112
winnerspiros merged 2 commits into
masterfrom
fix/android-16-startup-crash-1721950423656955281

Conversation

@google-labs-jules

Copy link
Copy Markdown

This PR addresses several startup crashes observed on Android 16 (S23 Ultra):

  1. Resolves "package is null" by moving PackageInfo retrieval out of the OsuGameAndroid constructor into a lazy accessor.
  2. Fixes initialization order in OsuGameActivity by moving game instantiation into OnCreate after Platform.Init.
  3. Guards against SELinux denials when accessing 'vendor.display.enable_optimal_refresh_rate' by adding robust error handling to refresh rate selection.
  4. Switches from Application.Context to Activity-local PackageManager for better reliability on modern Android.

PR created automatically by Jules for task 1721950423656955281 started by @winnerspiros

@google-labs-jules

Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@winnerspiros

Copy link
Copy Markdown
Owner

actual crash logs:

This information is generated from the Crash Log View application. - https://play.google.com/store/apps/details?id=com.arumcomm.crashlogviewer

SystemUptimeMs: 169992719
Process: sh.ppy.osulazer
PID: 14440
UID: 10652
Frozen: false
Flags: 0x10d8be44
Package: sh.ppy.osulazer v38 (0.0.0)
Foreground: Yes
Process-Runtime: 2341
Timestamp: 2026-03-27 12:02:16.063+0200
Build: samsung/dm3qxeea/dm3q:16/BP2A.250605.031.A3/S918BXXS9EZB6:user/release-keys
Crash-Handler: mono.android.XamarinUncaughtExceptionHandler
Loading-Progress: 1.0
Dropped-Count: 0

android.runtime.JavaProxyThrowable: [osu.Framework.Allocation.DependencyNotRegisteredException]: The type OsuGameAndroid has a dependency on OsuConfigManager, but the dependency is not registered.
at osu.Framework.Utils.SourceGeneratorUtils.GetDependency(Unknown Source:0)
at osu.Framework.Utils.SourceGeneratorUtils.GetDependency(Unknown Source:0)
at osu.Android.OsuGameAndroid+<>c.b__32_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.Activate(Unknown Source:0)
at osu.Framework.Allocation.DependencyContainer.Inject(Unknown Source:0)
at osu.Framework.Graphics.Drawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Drawable.load(Unknown Source:0)
at osu.Framework.Graphics.Drawable.Load(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.load(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable+<>c.b__209_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.Activate(Unknown Source:0)
at osu.Framework.Allocation.DependencyContainer.Inject(Unknown Source:0)
at osu.Framework.Graphics.Drawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Drawable.load(Unknown Source:0)
at osu.Framework.Graphics.Drawable.Load(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.load(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable+<>c.b__209_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.Activate(Unknown Source:0)
at osu.Framework.Allocation.DependencyContainer.Inject(Unknown Source:0)
at osu.Framework.Graphics.Drawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Drawable.load(Unknown Source:0)
at osu.Framework.Graphics.Drawable.Load(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.load(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable+<>c.b__209_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.Activate(Unknown Source:0)
at osu.Framework.Allocation.DependencyContainer.Inject(Unknown Source:0)
at osu.Framework.Graphics.Drawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Drawable.load(Unknown Source:0)
at osu.Framework.Graphics.Drawable.Load(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.load(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable+<>c.b__209_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.g__activateRecursively|8_0(Unknown Source:0)
at osu.Framework.Allocation.DependencyActivator.Activate(Unknown Source:0)
at osu.Framework.Allocation.DependencyContainer.Inject(Unknown Source:0)
at osu.Framework.Graphics.Drawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(Unknown Source:0)
at osu.Framework.Graphics.Drawable.load(Unknown Source:0)
at osu.Framework.Graphics.Drawable.Load(Unknown Source:0)
at osu.Framework.Platform.GameHost.bootstrapSceneGraph(Unknown Source:0)
at osu.Framework.Platform.GameHost.Run(Unknown Source:0)
at osu.Framework.Android.AndroidGameActivity.Main(Unknown Source:0)
at Org.Libsdl.App.SDLActivity.n_Main(Unknown Source:0)
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(Unknown Source:0)
at crc64eb0f9b4bca91a892.AndroidGameActivity.n_main(Native Method)
at crc64eb0f9b4bca91a892.AndroidGameActivity.main(AndroidGameActivity.java:52)
at org.libsdl.app.SDLMain.run(SDLActivity.java:2164)
at java.lang.Thread.run(Thread.java:1564)

@winnerspiros
winnerspiros merged commit d514f44 into master Mar 28, 2026
5 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant